var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');


var schema = new mongoose.Schema({
    title:String,
    price:String,
    pic:String,
    desc:String,
    cateId:mongoose.Schema.ObjectId,
    date: { type: Date, default: Date.now }
    


});

schema.plugin(mongoosePaginate);

module.exports =  mongoose.model('Product',  schema); // Model.paginate()